package com.smedi.ismedi.organization.core.domain.service;

import com.smedi.ismedi.organization.core.domain.aggregatemodel.HrOrganization;

import java.util.List;

public interface HrOrganizationDomainService {
    HrOrganization save(HrOrganization data);

    void delete(Long hrOrganizationId);

    List<HrOrganization> getHrOrganizationChildrenByList(Long hrOrganizationId);

    List<HrOrganization> getHrOrganizationChildrenByTree(Long hrOrganizationId);

    /**
     * 只保留特定类型的节点
     *
     * @param hrOrganizationId 企业组织id
     * @param typeList 类型列表
     * @return List<HrOrganization>
     */
    List<HrOrganization> getHrOrganizationChildrenByTreeWithTypeList(Long hrOrganizationId, List<String> typeList);

    Boolean validateHrOrganization(Long hrOrganizationId);

    Boolean duplicateFullName(String fullName, Long hrOrganizationId);

    Boolean duplicateShortName(String shortName, Long hrOrganizationId);

    Boolean duplicateCode(String code, Long hrOrganizationId);

    Boolean validateHrOrganizationCanHasProject(Long hrOrganizationId);

    void saveHrOrganizationDisplayOrder(Long hrOrganizationId, Integer displayOrder);

    long updateHrOrgByShortName(String shortName,String dingDeptKey);
}
